﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LowLevelGraphics.Filter
{
    //TODO: s. RoboRealm
    /// <summary>
    /// Population Threshold
    /// </summary>
    public class PopulationThreshold : BaseForeBackgroundColorFilter
    {
        protected int m_nPopulationThreshold = 0;
        protected int m_nIntensityThreshold = 0;
        protected int m_nWindowSize = 0;

        /// <summary>
        /// 
        /// </summary>
        public PopulationThreshold()
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="_populationThreshold"></param>
        internal PopulationThreshold(PopulationThreshold _populationThreshold)
        {
            this.m_nPopulationThreshold = _populationThreshold.m_nPopulationThreshold;
            this.m_nIntensityThreshold = _populationThreshold.m_nIntensityThreshold;
            this.m_nWindowSize = _populationThreshold.m_nWindowSize;
        }

        /// <summary>
        /// Gets or sets population threshold
        /// </summary>
        public int ThresholdOfPopulation
        {
            get { return m_nPopulationThreshold; }
            set { m_nPopulationThreshold = value; }
        }

        /// <summary>
        /// Gets or sets intensity threshold
        /// </summary>
        public int IntensityThreshold
        {
            get { return m_nIntensityThreshold; }
            set { m_nIntensityThreshold = value; }
        }

        /// <summary>
        /// Gets or sets window size
        /// </summary>
        public int WindowSize
        {
            get { return m_nWindowSize; }
            set { m_nWindowSize = value; }
        }

        /// <summary>
        /// Executes this instance
        /// </summary>
        /// <param name="_bitmap"></param>
        /// <returns></returns>
        public override UnsafeBitmap Execute(UnsafeBitmap _bitmap)
        {
            return base.Execute(_bitmap);
        }

        /// <summary>
        /// Clones this instance
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            return new PopulationThreshold(this);
        }
    }
}
